package practice;

/**
 * Description:
 *
 * @Author cowen
 * @Create 2023/10/19 10:26
 * @Version 1.0
 */
//数组反转
class ArrayReverse{
    public static void main(String[] args) {
        int[] nums = {1,2,3,4,5,6,7,8,9};
        for (int i = 0; i < nums.length/2; i++) {
            int temp = nums[i];
            nums[i]=nums[nums.length-1-i];
            nums[nums.length-1-i]=temp;
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i]);
        }
    }
}
